package com.stars.dao.mapper.company;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import com.stars.entity.ListPage;
import com.stars.entity.company.CompanyEntity;
import com.stars.entity.dto.company.CompanyDTO;
import java.util.List;
/**
 * @Title:  mybatis dao
 * @author dj
 * @date 2019-09-30 13:00:05
 * @version V1.0
 *
 */
public interface CompanyMapper extends  Mapper<CompanyEntity>{

    /**
     * 分页查询
     * @param listPage 查询参数 起始页，大小。
     * @return
     */
    List<CompanyDTO> pageQueryCompany(ListPage<CompanyDTO> listPage) throws Exception;

    /**
     * 根据资源id查询子菜单
     * @param Companylist 资源
     * @return 菜单树
     * @throws Exception
     */
    List<CompanyDTO> findTree(@Param("list")List<CompanyEntity> Companylist) throws Exception;

    List<CompanyEntity> findByName(@Param("companyName") String perName) throws Exception;
}